home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
indus
/
cpaledg1
/
stoact.bas
< prev
next >
Wrap
BASIC Source File
|
1986-02-28
|
14KB
|
254 lines
500 ' COPYRIGHT 1985 TRONOLONE & FOSTER, PC
1000 ' STOACT. THE ORDER OF DATA IN PASACT.FIL IS:
1010 ' 1. THE QUANTITY OF ACCOUNTS BEFORE THE COMPANY NAME
1020 ' 2. ACCOUNT NUMBER FOR ACCTS REC.
1030 ' 3. " " " BEGINNING INVENTORY
1040 ' 4. " " " RETAINED EARNINGS
1050 ' 5. " " " QTY. OF BANK ACCOUNTS
1060 ' 6. " " " THE BANK ACCOUNT NUMBERS (QTY DEPENDS ON #5)
1070 ' 7. " " " ACCOUNT NUMBER FOR SALES
1080 ' 8. " " " LAST ACCOUNT IN THE FILE
1090 ' 9. " " " COMPANY NAME
1100 CLEAR: CLS: LOCATE 10,1: ON ERROR GOTO 3410: BEEP: BEEP: BEEP
1110 PRINT"CPA-LEDGER IS READY TO BEGIN PROCESSING GENERAL LEDGER FILES THAT ARE ON YOUR"
1120 PRINT"'DATA DISKETTE'. BEFORE YOU CONTINUE, BE SURE THAT THE 'DATA DISKETTE' IS IN"
1130 PRINT"DISK DRIVE 'A'. (ONCE YOU PRESS A KEY TO CONTINUE, CPA-LEDGER WILL LOOK FOR"
1140 PRINT"THE 'DATA DISKETTE'. IF IT IS NOT IN DISK DRIVE 'A', THIS OPTION WILL NOT BE"
1150 PRINT"EXECUTED AND YOU WILL BE RETURNED TO THE DAILY MENU.)": PRINT: GOSUB 2460
1160 CLS: KEY OFF: CLEAR: LOCATE 1,1: BEEP: BEEP: BEEP: DIM B(30)
1170 PRINT"SEVERAL OF THE COMPUTER PROGRAMS THAT PROCESS YOUR TRANSACTIONS NEED TO KNOW"
1180 PRINT"THE ACCOUNT NUMBERS THAT HAVE BEEN ASSIGNED TO VARIOUS ACCOUNTS. THIS"
1190 PRINT"COMPUTER PROGRAM ASKS YOU TO ENTER THE APPROPRIATE ACCOUNT NUMBERS AND STORES"
1200 PRINT"THEM FOR AUTOMATIC REFERENCE WHEN THEY ARE NEEDED.": PRINT
1210 PRINT"USE A CURRENT LISTING OF GENERAL LEDGER ACCOUNTS WHILE MAKING INPUT TO THIS"
1220 PRINT"COMPUTER PROGRAM.": PRINT
1230 PRINT"PROCESSING WILL BE AS FOLLOWS. THE COMPUTER WILL DISPLAY THE NAME OF AN"
1240 PRINT"ACCOUNT ON THE COMPUTER SCREEN AND ASK YOU TO ENTER THE ACCOUNT NUMBER FOR THAT"
1250 PRINT"ACCOUNT. THE NAME DISPLAYED MAY NOT BE EXACTLY THE SAME AS YOU ASSIGNED IN THE"
1260 PRINT"GENERAL LEDGER, BUT YOU WILL KNOW WHICH ACCOUNT IS BEING REFERENCED.": PRINT
1270 PRINT"AFTER YOU GIVE YOUR INPUT, THE COMPUTER WILL DISPLAY THE ACTUAL ACCOUNT TITLE"
1280 PRINT"FOR THAT ACCOUNT NUMBER AND ASK YOU TO CONFIRM YOUR INPUT.": PRINT
1290 PRINT"YOU MAY BE ASKED TO ENTER AN ACCOUNT NUMBER FOR AN ACCOUNT THAT IS NOT INCLUDED"
1300 PRINT"IN THE GENERAL LEDGER. IN THIS CASE, ENTER A 0 (ZERO). THE COMPUTER WILL"
1310 PRINT"RECOGINZE THE ZERO AS PERTAINING TO AN ACCOUNT THAT IS NOT IN THE GENERAL"
1320 PRINT"LEDGER.": PRINT
1330 PRINT"PRESS ANY KEY WHEN YOU ARE READY TO CONTINUE."
1340 GOSUB 2470
1350 DIM A(20) 'ARRAY FOR ACCT NBRS
1360 C1=0: F1=0: M3=0
1370 CLS: LOCATE 12,32: PRINT"PLEASE STAND BY.": GOSUB 2310
1380 WHILE NOT EOF(1)
1390 M3=M3+1: GET #1,M3: I1$=X1$
1400 IF F1=1 THEN GOTO 1420
1410 IF I1$="SALES " THEN Z99=M3: F1=1
1420 WEND
1430 M3=M3-1: FOR V = 1 TO 3
1440 IF V=1 THEN T1$="ACCOUNTS RECEIVABLE": GOTO 1470
1450 IF V=2 THEN T1$="BEGINNING MERCHANDISE INVENTORY": GOTO 1470
1460 IF V=3 THEN T1$="RETAINED EARNINGS"
1470 CLS: LOCATE 10,1
1480 PRINT"ENTER THE ACCOUNT NUMBER FOR ";T1$;". ";: GOSUB 2990: ROW=10: COLUMN=64: LENGTH=4: GOSUB 3000
1490 GOSUB 2380 'CHK FOR NONNUMS
1500 IF I8$ < "0" THEN BEEP: BEEP: BEEP: GOTO 1470
1510 IF F1=1 THEN GOSUB 2430: GOSUB 2450: GOTO 1470
1520 C1=VAL(I8$)
1530 IF C1 > M3 THEN GOSUB 2510: GOTO 1470 'CHK ACCT NBR UPPER LIMIT
1540 IF C1 > 0 THEN GOTO 1570
1550 GOSUB 2550 'VERIFY INPUT OF ZERO FOR ACCT NBR
1560 IF I8$ = "N" THEN GOTO 1470 ELSE GOTO 1710
1570 GET #1,C1
1580 I5$=X4$
1590 IF I5$ = "1" THEN GOTO 1610
1600 GOSUB 2810: GOTO 1470
1610 F1=0
1620 FOR K = 1 TO C2 'CHK FOR DOUBLE ENTRY OF ACCT NBR
1630 IF A(K)=C1 THEN F1=1
1640 NEXT K
1650 IF F1=0 THEN GOTO 1690
1660 GOSUB 2810 'ERROR MSG
1670 IF F1=2 THEN GOTO 1160 'DESIRE TO RESTART
1680 GOTO 1470
1690 GOSUB 2630 'DISPLAY INPUT FOR VERIFICATION
1700 IF I8$= "N" THEN GOTO 1470
1710 WRITE #2,C1: C2=C2+1: A(C2)=C1: F11=F11+1
1720 NEXT V: CLS
1730 BEEP: BEEP: BEEP: CLS: LOCATE 5,1
1740 PRINT"HOW MANY DIFFERENT CHECKING ACCOUNTS SHOULD BE INCLUDED IN THE GENERAL LEDGER?"
1750 PRINT"CAREFULLY NOTE THAT THE REQUESTED INPUT IS FOR THE NUMBER OF DIFFERENT CHECKING"
1760 PRINT"ACCOUNTS - NOT FOR THE NUMBER OF BANKS IN WHICH YOU HAVE THOSE CHECKING"
1770 PRINT"ACCOUNTS. FOR EXAMPLE, IT YOU HAVE TWO DIFFERENT CHECKING ACCOUNTS IN ONE"
1780 PRINT"BANK, YOUR INPUT SHOULD BE 2. IF YOU HAVE FIVE CHECKING ACCOUNTS IN TWO"
1790 PRINT"BANKS, YOUR INPUT SHOULD BE 5."
1800 LOCATE 18,1: PRINT SPACE$(80): LOCATE 18,1
1810 PRINT"ENTER YOUR INPUT NOW.";: GOSUB 2990: ROW=18: COLUMN=25: LENGTH=1: GOSUB 3000
1820 GOSUB 2380
1830 IF F1=1 THEN LOCATE 20,1: GOSUB 2440: LOCATE 21,1: GOSUB 2460: LOCATE 20,1: PRINT SPACE$(80): LOCATE 21,1: PRINT SPACE$(80): GOTO 1800
1840 C11=VAL(I8$)
1850 WRITE #2,C11: A(C2)=C11: W1=C2: F11=F11+1 'WRITE QTY OF BANK ACCOUNTS
1860 IF C11 = 0 THEN GOTO 2150
1870 T1$=" BANK ACCOUNT "
1880 FOR V = 1 TO C11
1890 CLS: LOCATE 10,1
1900 PRINT"ENTER THE ACCOUNT NUMBER FOR";T1$;V;" OF ";C11;".";: GOSUB 2990: ROW=10: COLUMN=55: LENGTH=4: GOSUB 3000
1910 GOSUB 2380 'CHK FOR NONNUMS
1920 IF F1=1 THEN GOSUB 2430: GOSUB 2450: GOTO 1890
1930 C1=VAL(I8$)
1940 IF C1 > M3 THEN GOSUB 2510: GOTO 1890 'CHK ACCT NBR UPPER LIMIT
1950 IF C1 > 0 THEN GOTO 1980
1960 GOSUB 2550 'VERIFY INPUT OF ZERO FOR ACCT NBR
1970 IF I8$ = "N" THEN GOTO 1890 ELSE GOTO 2130
1980 GET #1,C1
1990 I5$=X4$
2000 IF I5$ = "1" THEN GOTO 2020
2010 GOSUB 2810: GOTO 1890
2020 F1=0
2030 FOR K = 1 TO C2 'CHK FOR DOUBLE ENTRY OF ACCT NBR
2040 IF K=W1 THEN GOTO 2060
2050 IF A(K)=C1 THEN F1=1
2060 NEXT K
2070 IF F1=0 THEN GOTO 2110
2080 GOSUB 2810 'ERROR MSG
2090 IF F1=2 THEN GOTO 1160 'DESIRE TO RESTART
2100 GOTO 1890
2110 GOSUB 2630 'DISPLAY INPUT FOR VERIFICATION
2120 IF I8$= "N" THEN GOTO 1890
2130 WRITE #2,C1: C2=C2+1: A(C2)=C1: F11=F11+1 'WRITE BANK ACCT#
2140 NEXT V
2150 CLOSE #2: OPEN "PASACT.FIL" FOR INPUT AS #2
2160 FOR S = 1 TO F11: INPUT #2,C1: B(S)=C1: NEXT S: CLOSE #2
2170 OPEN "PASACT.FIL" FOR OUTPUT AS #2
2180 WRITE #2,F11+3
2190 FOR P = 1 TO F11: WRITE #2,B(P): NEXT P: F11=F11+1
2200 WRITE #2,Z99: WRITE #2,M3: F11=F11+2 'WRITE SALES ACCT#(Z99) AND LAST REC#(M3)
2210 CLS: LOCATE 5,1
2220 PRINT"ONE LAST INPUT IS REQUIRED BEFORE PROCESSING BY THIS PROGRAM WILL BE COMPLETE."
2230 PRINT"THAT INPUT IS THE NAME OF THE COMPANY OR THE INDIVIDUAL FOR WHOM FINANCIAL"
2240 PRINT"RECORDS ARE TO BE MAINTAINED. FOR EXAMPLE, IF THE NAME IS 'ABC COMPANY', YOUR"
2250 PRINT"INPUT SHOULD BE 'ABC COMPANY' (WITHOUT THE QUOTES).": PRINT
2260 PRINT"ENTER THE NAME NOW.": ROW=10: COLUMN=23: LENGTH=30: GOSUB 3000
2270 IF LEFT$(I8$,1) = " " THEN BEEP: BEEP: BEEP: GOTO 2210
2280 WRITE #2,I8$ 'WRITE COMPANY NAME
2290 LSET V1$="0": LSET V2$=MKD$(0#): LSET V3$=MKD$(0#): PUT #3,1
2300 GOTO 3210
2310 OPEN "TEST1.FIL" FOR INPUT AS #2: CLOSE #2
2320 OPEN "TEST2.FIL" FOR OUTPUT AS #2: CLOSE #2
2330 OPEN "R",1,"GENLEG.FIL",111
2340 FIELD #1,25 AS X1$,30 AS X2$,6 AS X3$,1 AS X4$,4 AS X5$,2 AS X7$,1 AS X8$,10 AS X9$,8 AS Y1$,8 AS Y2$,8 AS Y3$,8 AS Y4$
2350 OPEN "R",3,"INVPRO.FIL",17
2360 FIELD #3,1 AS V1$,8 AS V2$,8 AS V3$
2370 OPEN "PASACT.FIL" FOR OUTPUT AS #2: RETURN
2380 F1=0
2390 FOR I = 1 TO LEN(I8$)
2400 IF MID$(I8$,I,1) < "0" OR MID$(I8$,I,1) > "9" THEN F1=1: I=LEN(I8$)
2410 NEXT I
2420 RETURN
2430 LOCATE 18,1
2440 PRINT"ENTRY IS INCORRECT. TRY AGAIN.": RETURN
2450 LOCATE 19,1
2460 PRINT"PRESS ANY KEY TO CONTINUE.
2470 GOSUB 2990
2480 K$=INKEY$
2490 IF K$="" THEN GOTO 2480
2500 RETURN
2510 LOCATE 15,1: BEEP: BEEP: BEEP
2520 PRINT"THE ACCOUNT NUMBER THAT INPUT IS TOO LARGE. THE LARGEST ACCOUNT NUMBER IN THE"
2530 PRINT"GENERAL LEDGER IS ";M3;". CONSULT A CURRENT LISTING OF THE ACCOUNTS AND TRY"
2540 PRINT"AGAIN. PRESS ANY KEY TO CONTINUE.": GOSUB 2470: RETURN
2550 LOCATE 13,1
2560 PRINT"YOUR INPUT FOR THE ACCOUNT NUMBER IS ZERO (0). FOR THAT INPUT, A ZERO, THE"
2570 PRINT"COMPUTER WILL ASSUME THAT THE ABOVE ACCOUNT IS NOT CURRENTLY INCLUDED IN THE"
2580 PRINT"GENERAL LEDGER. IS THAT ASSUMPTION